package cn.xxd.service.impl;

import cn.xxd.entity.ShopCart;
import cn.xxd.service.ShopCartService;
import cn.xxd.service.dao.ShopCartDao;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

// 注册为 Dubbo 服务
@Service(version = "1.0.0", interfaceClass = ShopCartService.class)
public class ShopCartServiceImpl implements ShopCartService {

    @Autowired
    private ShopCartDao shopCartDao;

    @Override
    public void saveOrUpdate(ShopCart shopCart) {
        shopCartDao.saveOrUpdate(shopCart);
    }

    @Override
    public int removeOrder(String id) {
        return shopCartDao.removeOrder(id);
    }

    @Override
    public int changeStatus(String id) {
        return shopCartDao.changeStatus(id);
    }
}
